/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.eduardcapell.lopodder.beans;

/**
 *
 * @author edu
 */
public class FeedStatus {

    public static final int STATUS_OK = 0;
    public static final int STATUS_ERROR = 1;
    public static final int STATUS_DOWNLOADING = 2;
    public static final int STATUS_DISABLED = 3;

    private int status = FeedStatus.STATUS_OK;
    
    public FeedStatus(int status) {
        this.status = status;
    }

    public FeedStatus() {}

    /**
     * @return the status
     */
    public int getStatus() {
        return status;
    }

    /**
     * @param status the status to set
     */
    public void setStatus(int status) {
        this.status = status;
    }

    private String getText() {
        switch (status) {
            case STATUS_DISABLED:
                return "Disabled";
            case STATUS_DOWNLOADING:
                return "Downloading";
            case STATUS_ERROR:
                return "Error";
            case STATUS_OK:
            default:
                return "";
        }
    }

    @Override
    public String toString() {
        return getText();
    }

}
